package com.sinux.generality.provider.pay.factory.detailorder.impl;

import com.sinux.generality.provider.pay.factory.enums.CostTypeEnums;
import com.sinux.generality.provider.pay.entity.GptPayOrderDetail;
import com.sinux.generality.provider.pay.factory.detailorder.AbstractMembershipPayOrderDetail;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/****
 * @className WxAbstractMembershipPayOrderDetail
 * @describe 微信挂号订单会员费子单实现
 * @author lhz
 * @date 2021/10/19 02:35
 * @version 0.0.1
 */
@Service
public class WxAbstractMembershipPayOrderDetail extends AbstractMembershipPayOrderDetail {


    @Override
    public GptPayOrderDetail create(Long businessId) {
        GptPayOrderDetail orderDetail = new GptPayOrderDetail();
        orderDetail.setBusinessOrderId(businessId);
        orderDetail.setPayablePrice(new BigDecimal(20));
        orderDetail.setPrice(new BigDecimal(20));
        orderDetail.setType(CostTypeEnums.MEMBERSHIP.getCode());
        return orderDetail;
    }
}